package com.cjy.dao;

import com.cjy.pojo.ImageType;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface ImageTypeRepository extends JpaRepository<ImageType,Long> {

    ImageType getImageTypeByName(String name);

    @Query("select t from ImageType t ")
    List<ImageType> findTop(Pageable pageable);
}
